<?php
/**
 * Created by PhpStorm.
 * User: Smile
 * Date: 2016/8/26
 * Time: 15:05
 */
$size = 5000;
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$zongshu = $page*$size;

$sql="select top $size * from (select top $zongshu  * from NC_DownAddress order by SoftID asc) NC_DownAddress order by SoftID desc";
if($sql){

}
$next=$page+1;
$ctrs=$sql."<script>
function abcdefg(){
    self.location.href='http://localhost/test.php?page=$next';
}
setTimeout('abcdefg()',2000);
</script>";
echo($ctrs);
//for($i=1;$i<$sum;$i++)
//{
//    $curr=$pages*$i;
//    $sql="select top $pages * from (select top $curr  * from NC_SoftList order by SoftID asc) NC_SoftList order by SoftID desc";
//    echo $sql."<br>";
//}